package net.huashitong.user.service;

import net.huashitong.user.dao.SecurityTokenDao;
import net.huashitong.user.entity.SecurityToken;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import com.sirdc.modules.sys.service.SysTableService;
@Service
public class SecurityTokenService extends StringPKService<SecurityToken> {
	@Autowired
	private SysTableService tableService;
	
	@Autowired
	private SecurityTokenDao dao;
	@Override
	protected BaseDao<SecurityToken, String> getDao() {
		return dao;
	}
	@Override
	protected void beforeSave(SecurityToken securityToken) {
		securityToken.setSysId(tableService.updateMaxSysId("t_gis_securityToken", null));
	}
}
